package validate

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func Test_getVersion(t *testing.T) {
	type args struct {
		group   string
		version string
	}
	tests := []struct {
		name string
		args args
		want string
	}{
		{
			name: "without group",
			args: args{
				group:   "",
				version: "v1",
			},
			want: "v1",
		},
		{
			name: "with group",
			args: args{
				group:   "v1",
				version: "v1",
			},
			want: "v1/v1",
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			assert.Equalf(t, tt.want, getVersion(tt.args.group, tt.args.version), "getVersion(%v, %v)", tt.args.group, tt.args.version)
		})
	}
}
